package com.yanqu.road.server.manger.activity.apprentice;

import com.yanqu.road.utils.executor.GeneralTask;

/**
 * 爱徒异步加天资异步线程逻辑处理器
 */
public class ApprenticeSyncAddTalentThreadTask extends GeneralTask {

    private int activityId;
    private long userId;
    private int talentType;
    private long talentValue;
    private long allTalentValue;


    public ApprenticeSyncAddTalentThreadTask(int activityId, long userId, int talentType, long talentValue, long allTalentValue) {
        this.activityId = activityId;
        this.userId = userId;
        this.talentType = talentType;
        this.talentValue = talentValue;
        this.allTalentValue = allTalentValue;
    }

    @Override
    public void doRun() {
        try{
            ApprenticeMgr.syncChangeUserTalent(activityId, userId, talentType, talentValue, allTalentValue);
        }catch (Exception e){
            getLOGGER().error("ApprenticeSyncAddTalentThreadTask error:",e);
        }
    }
}
